<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>dots rotate</title>
  <link rel="stylesheet" href="./style.css" type="text/css" />
  <body>
    <div class="container"></div>
    <script>
      const container = document.querySelector(".container");

      const frag = document.createDocumentFragment();

      for (let i = 0; i < 12 * 12; i++) {
        const square = document.createElement("div");
        square.classList.add("square");
        const dot = document.createElement("div");
        dot.classList.add("dot");
        const cloneDot = dot.cloneNode(true);
        square.appendChild(dot);
        square.appendChild(cloneDot);
        frag.appendChild(square);
      }

      container.appendChild(frag);
    </script>
  </body>
</html>
